Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(db/get-repo): utilize db indexing #1192

Closed
wants to merge 1 commit into from

Conversation

wass3rw3rk
Copy link
Member

@wass3rw3rk wass3rw3rk commented Sep 20, 2024

we index full_name (

previous_name VARCHAR(100),
approve_build VARCHAR(20),
UNIQUE(full_name)
);
`
), but are not leveraging it.

@wass3rw3rk wass3rw3rk requested a review from a team as a code owner September 20, 2024 19:59
@wass3rw3rk wass3rw3rk changed the title refactor(db/get-repos): utilize db indexing refactor(db/get-repo): utilize db indexing Sep 20, 2024
api/webhook/post.go Show resolved Hide resolved
database/repo/get_org.go Show resolved Hide resolved
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Project coverage is 53.04%. Comparing base (59553f5) to head (fa013a7).

Files with missing lines Patch % Lines
api/webhook/post.go 0.00% 2 Missing ⚠️
api/build/compile_publish.go 0.00% 1 Missing ⚠️
api/dashboard/create.go 0.00% 1 Missing ⚠️
api/repo/create.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1192      +/-   ##
==========================================
- Coverage   53.04%   53.04%   -0.01%     
==========================================
  Files         559      559              
  Lines       19742    19735       -7     
==========================================
- Hits        10473    10469       -4     
+ Misses       8700     8697       -3     
  Partials      569      569              
Files with missing lines Coverage Δ
database/repo/get_org.go 81.25% <100.00%> (-4.47%) ⬇️
router/middleware/repo/repo.go 100.00% <100.00%> (ø)
api/build/compile_publish.go 0.00% <0.00%> (ø)
api/dashboard/create.go 0.00% <0.00%> (ø)
api/repo/create.go 0.00% <0.00%> (ø)
api/webhook/post.go 0.00% <0.00%> (ø)

@wass3rw3rk
Copy link
Member Author

redacting, because we do index org and name :shame:

CreateOrgNameIndex = `
CREATE INDEX
IF NOT EXISTS
repos_org_name
ON repos (org, name);
`

@wass3rw3rk wass3rw3rk closed this Sep 20, 2024
@wass3r wass3r deleted the refactor/db/get-repo branch September 20, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant